package com.action.boot.jpa.controller;

import com.action.boot.jpa.dto.WebRequest;
import com.action.boot.jpa.dto.WebResponse;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Wuxiang on 2018/4/26
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @RequestMapping(value = "/info", method = RequestMethod.POST)
    public WebResponse info(@RequestBody WebRequest request) {
        System.out.println(request.toString());

        WebResponse response = new WebResponse();
        response.setCode("10001");
        response.setMessage("成功");
        return response;
    }
}
